package cn.com.taiji.oospub.wechat.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.dreamyoung.mprelation.EntityMapper;
import com.github.dreamyoung.mprelation.JoinColumn;
import com.github.dreamyoung.mprelation.ManyToOne;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2020-10-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ReceiveAddress implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @TableField("Member_Id")
    private String memberId;

    @TableField("Address")
    private String address;

    @TableField("Is_First")
    private String isFirst;

    @TableField("is_delete")
    private Boolean isDelete = false;

    @TableField("Create_Time")
    private LocalDateTime createTime;

    @TableField(exist = false)
    @EntityMapper
    @ManyToOne
    @JoinColumn(name = "member_Id", referencedColumnName = "ID")
    private MemberBaseInfo member;

    private String name = "匿名用户";

    private String tel;

    private String architecture;

    @TableField(exist = false)
    @JsonProperty(value = "isDefault")
    private boolean isIsDefault;

    @TableField(exist = false)
    private String addressDetail;

    @TableField("hisSpaceID")
    private String hisSpaceID;

    @TableField(exist = false)
    private String patientNumber;


}
